<template>
<div id="app">
  <mt-header :title="msg">
    <router-link to="/bar" slot="left">
      <mt-button icon="back">返回</mt-button>
    </router-link>
    <mt-button icon="more" slot="right"></mt-button>
  </mt-header>
  <div>
    {{ $route.path }}
    <button type="button" name="button" v-on:click="show">点击我</button>
    <router-view></router-view>
  </div>
  <mt-tabbar>
    <mt-tab-item v-for="item in footerDatas" :id="item">
      <router-link :to="item.url">{{item.name}}</router-link>
    </mt-tab-item>
  </mt-tabbar>
</div>
</template>

<script>
import {Toast} from "mint-ui"
export default {
  name: 'app',
  data() {
    return {
      msg: '我只是个菜鸡',
      footerDatas: [{name: 'bar', url: '/bar'}, {name: 'foo', url: '/foo'}]
    }
  },
  methods: {
    show : () => console.log(this.$route)
  }
}
</script>
